/* GUI CONVERTED from rqrqiq4.p (converter v1.75) Sat Aug 12 23:13:06 2000 */
/* rqrqiq4.p - REQUISITION OUT OF TOLERANCE INQUIRY                           */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/*V8:ConvertMode=Report                                                       */
/*J314*/ /*V8:RunMode=Character,Windows                                       */
/* Revision: 8.5    LAST MODIFIED BY: 07/21/97  By: B. Gates          *J1Q2*  */
/* Revision: 8.5    LAST MODIFIED BY: 10/30/97  By: Patrick Rowan     *J243*  */


/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb                  */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

         {mfdtitle.i "b+ "}

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE rqrqiq4_p_1 "Requisition Date"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

     {rqconst.i}

     define variable nbr like rqd_nbr no-undo.
     define variable due_date like rqd_due_date no-undo.
     define variable need_date like rqd_need_date no-undo.
     define variable req_date like rqm_req_date no-undo.
     define variable eby_userid like rqm_eby_userid no-undo.
     define variable rqby_userid like rqm_rqby_userid no-undo.
     define variable end_userid like rqm_end_userid no-undo.
     define variable rtto_userid like rqm_rtto_userid no-undo.
     define variable base_1 like base_curr no-undo.
     define variable base_2 like base_curr no-undo.

         
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
            
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
nbr         colon 12
            due_date        colon 35
/*J243*
.           need_date       colon 65
.           req_date        colon 12
.*J243*/
/*J243*/    req_date        colon 65    label {&rqrqiq4_p_1}
/*J243*/    need_date       colon 12
            eby_userid      colon 35
            rqby_userid     colon 65
            end_userid      colon 12
            rtto_userid     colon 35
         with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



         /* SET EXTERNAL LABELS */
         setFrameLabels(frame a:handle).

     FORM /*GUI*/  with STREAM-IO /*GUI*/  frame b down width 80 no-attr-space.

     base_1 = base_curr.
     base_2 = base_curr.

         repeat:
            update
            nbr
            due_date
/*J243*/    req_date
            need_date
/*J243*     req_date    */
            eby_userid
            rqby_userid
            end_userid
            rtto_userid
        with frame a editing:
           if frame-field = "nbr" then do:
                  {mfnp.i rqm_mstr nbr rqm_nbr nbr rqm_nbr rqm_nbr}

                  if recno <> ? then do:
             display rqm_nbr @ nbr with frame a.
                  end.
           end.
           else
           if frame-field = "eby_userid" then do:
                  {mfnp.i usr_mstr
                  eby_userid usr_userid eby_userid usr_userid usr_userid}

                  if recno <> ? then do:
                     display usr_userid @ eby_userid with frame a.
                  end.
           end.
           else
           if frame-field = "rqby_userid" then do:
                  {mfnp.i usr_mstr
                  rqby_userid usr_userid rqby_userid usr_userid usr_userid}

                  if recno <> ? then do:
                     display usr_userid @ rqby_userid with frame a.
                  end.
           end.
           else
           if frame-field = "end_userid" then do:
                  {mfnp.i usr_mstr
                  end_userid usr_userid end_userid usr_userid usr_userid}

                  if recno <> ? then do:
                     display usr_userid @ end_userid with frame a.
                  end.
           end.
           else
           if frame-field = "rtto_userid" then do:
                  {mfnp.i usr_mstr
                  rtto_userid usr_userid rtto_userid usr_userid usr_userid}

                  if recno <> ? then do:
                     display usr_userid @ rtto_userid with frame a.
                  end.
           end.
           else do:
              status input.
          readkey.
          apply lastkey.
           end.
            end.

            hide frame b no-pause.
            clear frame b all no-pause.

            {mfselprt.i "terminal" 80}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


        for each rqd_det no-lock
        where rqd_aprv_stat = APPROVAL_STATUS_OOT
        and (rqd_nbr = nbr or nbr = "")
        and (rqd_due_date = due_date or due_date = ?)
        and (rqd_need_date = need_date or need_date = ?),
        each rqm_mstr no-lock
        where rqm_nbr = rqd_nbr
        and (rqm_req_date = req_date or req_date = ?)
        and (rqm_eby_userid = eby_userid or eby_userid = "")
        and (rqm_rqby_userid = rqby_userid or rqby_userid = "")
        and (rqm_end_userid = end_userid or end_userid = "")
        and (rqm_rtto_userid = rtto_userid or rtto_userid = ""):
               /* SET EXTERNAL LABELS */
               setFrameLabels(frame b:handle).
               display
           rqd_nbr
           rqd_line
           space(5)
           rqd_oot_ponetcst
           base_1
           rqd_oot_poum
           space(5)
           rqd_oot_rqnetcst
           base_2
           rqd_oot_rqum
               with frame b STREAM-IO /*GUI*/ .

               down 1 with frame b.
        end.

            {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

            {mfmsg.i 8 1}
         end.
